"""
__author__="yanwei"
__describe__="浏览器驱动"
"""

from selenium import webdriver
from webdriver_manager.chrome import ChromeDriverManager #自动更新chromedriver




class BrowserDriver:

    def browser_chrome(self, url):
        """启用谷歌浏览器"""
        # driver = webdriver.Chrome(ChromeDriverManager().install())
        driver = webdriver.Chrome()
        driver.get(url)
        return driver

    def browser_firefox(self, url):
        '''启动火狐浏览器'''
        driver = webdriver.Firefox()
        driver.get(url)
        return driver



if __name__=="__main__":
    BrowserDriver().browser_chrome("https://www.baidu.com")